<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>体检统计报表管理</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
	$(document).ready(function() {
		$(document).on("click","#btnReset",function(){
			$("#schoolCodeId").val("");
			$("#schoolCodeName").val("");
			$("#classCodeId").val("");
			$("#classCodeName").val("");
			$("#stuGrade").val("").select2();
			$("#beginDate").val("");
			$("#endDate").val("");;
		});
	});
	function page(n,s){
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
       	return false;
    }
	function down(){
		layer.confirm('确认要导出体检统计报表吗？', {
			btn : [ '确认', '取消' ]
		}, function() {
			$("#searchForm").attr("action", "${ctx}/childtijianrecord/childTijianRecord/exportExcel");
			$("#searchForm").submit();
			layer.msg('正在导出', {icon: 1});
			$("#searchForm").attr("action", "${ctx}/childtijianrecord/childTijianRecord/list1");
		}, function() {

		});
	}
</script>
<style type="text/css">
	.minWidth {
		min-width: 177px;
	}
	.autoWidth {
	    width: auto;
	}
	.select2-choices{
	    border-radius: 4px;
	}
	#contentTable td ,#contentTable th{
		text-align: center;
		padding: 2px 10px;
	}
	#contentTable tbody tr td{
		font-size: 14px;
	}
</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="javascript:;">体检统计报表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="childTijianRecord" action="${ctx}/childtijianrecord/childTijianRecord/list1" method="post" class="breadcrumb form-search" autocomplete="off">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="breadcrumb">
			<table class="table table-bordered">
				<tr>
					<th>学校：</th>
					<td>
						<%-- <form:input path="school.schName" id="schoolName" class="span2 minWidth"/> --%>
						<sys:treeselect2 id="schoolCode" name="schoolCode" value="${childTijianRecord.schoolCode}" labelName="schoolName" labelValue="${childTijianRecord.schoolName}"
			                title="学校" url="/sysschool/sysSchool/schTreeData" cssClass="input-medium" layer = "true" notAllowSelectParent="true" notAllowSelectRoot="true"/>
					</td>
					<%-- <th>班级：</th>
					<td>
						<form:input path="student.className" id="className" class="span2 minWidth"/>
						<sys:treeselect2 id="classCode" name="classCode" value="${childTijianRecord.classCode}" labelName="className" labelValue="${childTijianRecord.className}"
			                title="班级" url="/classinfo/classInfo/classTreeData" cssClass="input-medium" layer = "true" notAllowSelectParent="true" notAllowSelectRoot="true"/>
					</td> --%>
                    <th>年级：</th>
                    <td>
                        <form:select path="student.stuGrade" id="stuGrade" class="span2 minWidth" >
                            <form:option value="" label="--请选择--"/>
                            <form:options items="${fns:getDictList('stu_grade')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                        </form:select>
                    </td>
				</tr>
				<tr>
					<th>体检起始日期：</th>
					<td>
						<input name="beginDate" id ="beginDate" type="text" maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${childTijianRecord.beginDate}" pattern="yyyy-MM-dd"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
					</td>
					<th>体检截止日期：</th>
					<td>
						<input name="endDate" id ="endDate" type="text" maxlength="20" class="input-medium Wdate"
							value="<fmt:formatDate value="${childTijianRecord.endDate}" pattern="yyyy-MM-dd"/>"
							onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
					</td>
				</tr>
			</table>
		</div>
		<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		<input id="btnReset" type="button" class="btn btn-primary" value="重置"/>
		<input onclick="down()" class="btn btn-primary" type="button" value="导出"/>
		<input id="btnPrint" class="btn btn-primary" type="button" value="打印"/>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th rowspan="2">年 级</th>
				<th rowspan="2">性 别 </th>
				<th rowspan="2">体检<br/>人数</th>
				<th rowspan="2">各项体检<br/>正常人数</th>
				<th colspan="3">身高标准体重</th>
				<th colspan="3">肺活量体重指数</th>
				<th>正常视力</th>
				<th>视力不良</th>
				<th colspan="13">疾病分类</th>
			</tr>
			<tr>
				<th>营养不良</th>
				<th>正 常 </th>
				<th>超 重</th>
				<th>优 秀</th>
				<th>及 格</th>
				<th>不及格</th>
				<th>5.3~5.0</th>
				<th>5.0以下</th>
				<th>血 压</th>
				<th>心 脏 </th>
				<th>肺</th>
				<th>肝 脾</th>
				<th>龋 齿</th>
				<th>牙 周</th>
				<th>沙 眼</th>
				<th>头颈部</th>
				<th>脊 柱</th>
				<th>胸 部</th>
				<th>四 肢</th>
				<th>皮肤病</th>
				<th>淋巴结</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${map}" var="maps" begin="0" varStatus="status">
			<tr>
			    <td>
		            ${fns:getDictLabel(maps.STU_GRADE,'stu_grade','')}
		        </td>
			    <td>
					${fns:getDictLabel(maps.GENDER,'sex','')}
			    </td>
			    <td>
			        ${maps.number}
			    </td>
				<td>
					${maps.healthy}
				</td>
				<td>
					${maps.thin}
				</td>
				<td>
					${maps.normal}
				</td>
				<td>
					${maps.overweight}
				</td>
				<td>
					${maps.excellent}
				</td>
				<td>
					${maps.pass}
				</td>
				<td>
					${maps.flunk}
				</td>
				<td>
					${maps.normalVision}
				</td>
				<td>
					${maps.porVision}
				</td>
				<td>
					${maps.blood}
				</td>
				<td>
					${maps.heart}
				</td>
				<td>
					${maps.luny}
				</td>
				<td>
					${maps.liver}
				</td>
				<td>
					${maps.mouth}
				</td>
				<td>
					${maps.tooth}
				</td>
				<td>
					${maps.trachoma}
				</td>
				<td>
					${maps.headNeck}
				</td>
				<td>
					${maps.spine}
				</td>
				<td>
					${maps.chestXray}
				</td>
				<td>
					${maps.limb}
				</td>
				<td>
					${maps.skin}
				</td>
				<td>
					${maps.lymphGland}
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>